<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Clearly/index')}">资讯列表</a></li>
        <li><a href="{:url('Clearly/add')}">添加资讯</a></li>
    </ul>

    <form method="post" class="js-ajax-form margin-top-20" action="{:url('Clearly/listOrder')}">
        <div class="table-actions">
            <!--<button class="btn btn-xs btn-success js-ajax-submit" type="submit">{:lang('SORT')}</button>-->
            <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
                    <!--data-action="{:url('Clearly/toggle',array('is_hot'=>1))}" data-subcheck="true">推荐-->
            <!--</button>-->
            <!--<button class="btn btn-sm btn-danger js-ajax-submit" type="submit"-->
                    <!--data-action="{:url('Clearly/toggle',array('is_hot'=>2))}" data-subcheck="true">取消推荐-->
            <!--</button>-->
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('Clearly/toggle',array('status'=>1))}" data-subcheck="true">显示
            </button>
            <button class="btn btn-sm btn-danger js-ajax-submit" type="submit"
                    data-action="{:url('Clearly/toggle',array('status'=>2))}" data-subcheck="true">隐藏
            </button>
            <button class="btn btn-sm btn-danger js-ajax-submit" type="submit"
                    data-action="{:url('Clearly/toggle',array('delete'=>1))}" data-subcheck="true">删除
            </button>
        </div>
        <php>
            $status=array('1'=>'显示','2'=>'隐藏');
        </php>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x"
                                             data-checklist="js-check-x"></label></th>
                <!--<th width="50">{:lang('SORT')}</th>-->
                <th width="50">ID</th>
                <th>资讯名称</th>
                <th>主图</th>
                <!--<th>价格</th>-->
                <!--<th>团购价</th>-->
                <!--<th>已参团人数</th>-->
                <!--<th>团购总人数</th>-->
                <!--<th>库存数</th>-->
                <!--<th>分佣比例</th>-->
                <th>创建时间</th>
                <!--<th>结束时间</th>-->
                <!--<th>是否推荐</th>-->
                <th width="50">{:lang('STATUS')}</th>
                <th width="120">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}"></td>
                    <td>{$vo.id}</td>
                    <td>{$vo.title}</td>
                    <td>
                        <if condition="!empty($vo['image'])">
                            <a href="javascript:imagePreviewDialog('{:cmf_get_image_preview_url($vo.image)}');">
                                <i class="fa fa-photo fa-fw"></i>
                            </a>

                        </if>
                    </td>
                    <td>{$vo['create_time']}</td>
                    <td>
                        <if condition="$vo.status eq 1">
                            <span class="label label-success">
                                {$status[$vo['status']]}
                            </span>
                            <else/>
                            <span class="label btn-danger">
                                {$status[$vo['status']]}
                            </span>
                        </if>
                    </td>
                    <td>
                        <a class="btn btn-xs btn-success"  href="{:url('Clearly/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Clearly/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>